package com.train.forum.pojo.enums;

/**
 * 代码信息
 *
 * @author mek
 * @date 2023/4/7
 */
public enum ResponseEnum {

    /**
     * 系统基本信息0-1000
     */
    SUCCESS(200, "操作成功"),
    FAILURE(400, "操作失败"),
    UPDATE_FAILURE(420, "数据修改失败"),
    REQUEST_ERROR(100, "请求错误"),
    SERVER_INTERNAL_ERROR(500, "服务端内部错误"),
    SERVICE_EXCEPTION(600, "业务逻辑错误"),

    //Exception
    BIND_EXCEPTION(550,"参数校验错误"),
    METHOD_ARGUMENT_NOT_VALID_EXCEPTION(551,"方法参数验证校验异常"),
    CONSTRAINT_VIOLATION_EXCEPTION(552,"数据完整性约束校验失败"),

    //data
    DATA_EMPTY(10,"数据不能为空"),
    DATA_IS_NOT_EXIST(11, "数据不存在"),

    NO_PERMISSION(401,"操作失败，没有权限"),
    NOT_LOGIN(402,"登录过期，请重新登录"),

    REMOVE_SUCCESS(700, "删除成功"),
    REMOVE_ERROR(701, "删除失败"),
    SAVE_SUCCESS(702,"保存成功"),
    SAVE_ERROR(703,"保存失败"),
    DATA_EXIST(750, "数据已经存在"),

    LOGIN_ERROR_USER_NONENTITY(800, "登录失败，手机号不存在"),
    LOGIN_ERROR_OPEN_ID_NONENTITY(801, "操作失败，用户数据已过期，请重新登录"),
    LOGIN_ERROR_PASSWORD_ERROR(802, "登录失败，账号或密码错误"),
    LOGIN_ERROR_PASSWORD_LIMIT(803, "登录失败次数达到3次，请?秒后在试"),

    SAVE_ERROR_BET_TYPE_NONENTITY(900, "下注失败，下注类型不存在"),
    SAVE_ERROR_BET_NUMBER_NONENTITY(901, "下注失败，下注期号不存在"),
    SAVE_ERROR_BET_DATA_ERROR(901, "下注失败，下注期号不存在"),


//    user
    USER_UPDATE_FAIL(1000,"修改用户信息失败"),
    USER_DISABLED(1001,"该账号已经被禁用，请联系管理员！"),
    ROLE_CANNOT_UPDATE_SYS_ROLE(1101, "不能修改系统默认角色信息"),
    ROLE_CANNOT_DELETE_SYS_ROLE(1102, "不能删除系统默认角色信息"),
    USER_CAN_NOT_ADD_SUPPER_ROLE(1103, "不能添加超级管理员信息"),
    USER_CAN_NOT_UPDATE_SUPPER_ROLE(1104, "不能修改超级管理员信息"),
    USER_CAN_NOT_DELETE_SUPPER_ROLE(1105, "不能删除超级管理员信息"),
    USER_CAN_NOT_UPDATE_SUPPER_ADMIN(1106, "用户角色不能修改为超级管理员"),
    USER_PHONE_EXIST(1107,"手机号已存在"),
    USER_PHONE_NOT_EXIST(11071,"手机号不存在"),
    USER_PHONE_UPDATED(11072,"手机号已经修改，请重新登录"),
    USER_VIP_EXPIRE(11073,"操作失败，会员已过期"),
    UPDATE_FAILED(1108, "原密码输入错误"),
    PWS_NOT_OLDPWD(1109, "新密码不能与原密码相同"),
    OPERATION_FAILED(1111, "操作失败,请联系管理员"),
    CALL_TOO_OFEN(1112,"请求太频繁，请稍后再试"),
    PHONE_CODE_EXCEED_NUMBER(1113,"今日发送短信次数已达上限"),
    PHONE_CODE_SEND_FAIL(1114,"短信发送失败"),
    PHONE_CODE_CHECK_FAIL(1115,"验证码错误"),



    PLEASE_NOT_SUBMIT(1116,"审核中,请勿重复提交"),
    FILE_EMPTY(1117,"文件为空,请上传"),
    FILE_WRITE_ERROR(1118,"文件保存失败"),
    USER_PHONE_CAN_NOT_EMPTY(1119,"手机号不能为空"),



    //FootballMatchCombination
    COMBINATION_IS_EXIST(1200,"今天推荐组合方案已经生成了"),
    COMBINATION_ERROR1(1201,"组合失败：必修选择2个及以上推荐方案进行组合"),
    COMBINATION_ERROR2(1202,"组合失败：请选择符合条件的推荐赛事进行组合"),

    //Log
    SYSLOG_DELETE_FAIL(1250,"删除系统日志失败"),

    //Notice

    NOTICE_TITLE_EXIST(750, "公告标题已存在,请重新编辑"),
    NOTICE_ADD_FAIL(1301, "添加公告失败"),
    NOTICE_UPDATE_FAIL(1302, "修改公告失败"),
    NOTICE_DELETE_FAIL(1303, "删除公告失败"),

    //Carousel
    CAROUSEL_ADD_FAIL(1304, "添加轮播图失败"),
    CAROUSEL_UPDATE_FAIL(1305, "修改轮播图失败"),
    CAROUSEL_DELETE_FAIL(1306, "删除轮播图失败"),

    //SportDigital
    DRAW_NUM_EXIST(1307,"该期号已存在,请重新填写"),
    SPORT_DIGITIAL_ADD_FAIL(1308,"添加体彩数据失败"),
    SPORT_DIGITIAL_UPDATE_FAIL(1309,"修改体彩数据失败"),
    SPORT_DIGITIAL_DELETE_FAIL(1310,"删除体彩数据失败"),

    //Welfare
    WELFARE_ADD_FAIL(1311,"添加福彩数据失败"),
    WELFARE_UPDATE_FAIL(1312,"修改福彩数据失败"),
    WELFARE_DELETE_FAIL(1313,"删除福彩数据失败"),
    LOTTERY_RESULT_FAIL(1314,"开奖号码与开球顺序，内容不匹配"),
    //支付宝支付信息
//    alipay_

    //方案
    COMBINATION_MUST_MORE_TWO(1400,"方案推荐必须选择2个或以上赛事进行组合"),
    COMBINATION_CANOT_DELETE(1401,"已经发布并开赛的方案不能删除"),


    //申请成为推单人
    PROMOTER_APPLY_RECORD_CANNOT_DELETE(1500,"只能删除自己的申请！"),
    PROMOTER_APPLY_RECORD_NOT_FOUND(1503,"该申请记录不存在!"),

    //关注
    FOLLOW_EXIST(1501,"已取消关注！"),
    FOLLOW_SUCCESS(1502,"关注成功！"),
    FOLLOW_NOT_EXIST(1504,"该关注对象不存在!"),
    FOLLOW_NOT_PROMOTER(1503,"该推单人不存在!"),
    FOLLOW_DELETE(1503,"删除失败，不是自己的关注对象!"),


    //推荐
    SUGGEST_CANOT_DELETE(1500,"已经发布并开赛的推荐不能删除"),

    //邀请
    REGISTER_ERROR_PASSWORD_IS_EMPTY(1600,"密码为空"),
    REGISTER_ERROR_USER_EXIST(1601,"用户已注册"),
    REGISTER_ERROR_USER_REGISTER_FAIL(1602,"用户注册失败"),
    REGISTER_ERROR_INVITE_CODE_ERROR(1603,"邀请码错误"),
    REGISTER_ERROR_INVITE_CODE_EMPTY(1603,"邀请码为空"),
    REGISTER_ERROR_INVITE_SELF(1604,"不能邀请自己"),
    REGISTER_ERROR_INVITE_USER_EXIST(1604,"已被邀请"),
    RESET_INVITE_QRCODE_ERROR(1605,"重置邀请二维码错误"),

    //智能管家模块
    SMART_USER_COMB_NOT_EXIST(1701,"用户方案不存在"),
    SMART_USER_COMB_FINISHED(1702,"添加失败，用户方案已经结束"),
    SMART_ADD_AMOUNT_ERROR(1703,"添加失败，收入或支出金额不能小于0"),
    SMART_LOSE_DATA_ERROR(1700,"每日亏损最大值未设置");



    /**
     * 状态码
     */
    private int code;
    /**
     * 信息描述
     */
    private String message;
    ResponseEnum() {
    }
    ResponseEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
